<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Qwt User&#39;s Guide: QwtPlainTextEngine Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Qwt User&#39;s Guide
   &#160;<span id="projectnumber">6.1.4</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('class_qwt_plain_text_engine.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_qwt_plain_text_engine-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">QwtPlainTextEngine Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A text engine for plain texts.  
 <a href="class_qwt_plain_text_engine.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="qwt__text__engine_8h_source.html">qwt_text_engine.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for QwtPlainTextEngine:</div>
<div class="dyncontent">
<div class="center"><img src="class_qwt_plain_text_engine__inherit__graph.png" border="0" usemap="#_qwt_plain_text_engine_inherit__map" alt="Inheritance graph"/></div>
<map name="_qwt_plain_text_engine_inherit__map" id="_qwt_plain_text_engine_inherit__map">
<area shape="rect" id="node2" href="class_qwt_text_engine.html" title="Abstract base class for rendering text strings. " alt="" coords="20,5,135,32"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a0ad29b2229a879afe49b546704eb7079"><td class="memItemLeft" align="right" valign="top"><a id="a0ad29b2229a879afe49b546704eb7079"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_plain_text_engine.html#a0ad29b2229a879afe49b546704eb7079">QwtPlainTextEngine</a> ()</td></tr>
<tr class="memdesc:a0ad29b2229a879afe49b546704eb7079"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
<tr class="separator:a0ad29b2229a879afe49b546704eb7079"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ada8796b2caaff7bb8d61e9fb1b5143"><td class="memItemLeft" align="right" valign="top"><a id="a0ada8796b2caaff7bb8d61e9fb1b5143"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_plain_text_engine.html#a0ada8796b2caaff7bb8d61e9fb1b5143">~QwtPlainTextEngine</a> ()</td></tr>
<tr class="memdesc:a0ada8796b2caaff7bb8d61e9fb1b5143"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:a0ada8796b2caaff7bb8d61e9fb1b5143"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac5cedc0d644433b2ff14b3740996eb7d"><td class="memItemLeft" align="right" valign="top">virtual double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_plain_text_engine.html#ac5cedc0d644433b2ff14b3740996eb7d">heightForWidth</a> (const QFont &amp;font, int flags, const QString &amp;text, double width) const</td></tr>
<tr class="separator:ac5cedc0d644433b2ff14b3740996eb7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab4937c7b9d44aa4d1cc5dcd1d7740b3b"><td class="memItemLeft" align="right" valign="top">virtual QSizeF&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_plain_text_engine.html#ab4937c7b9d44aa4d1cc5dcd1d7740b3b">textSize</a> (const QFont &amp;font, int flags, const QString &amp;text) const</td></tr>
<tr class="separator:ab4937c7b9d44aa4d1cc5dcd1d7740b3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84d8e3e2a4710d3e1143ca47020f1c4a"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_plain_text_engine.html#a84d8e3e2a4710d3e1143ca47020f1c4a">draw</a> (QPainter *painter, const QRectF &amp;rect, int flags, const QString &amp;text) const</td></tr>
<tr class="memdesc:a84d8e3e2a4710d3e1143ca47020f1c4a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draw the text in a clipping rectangle.  <a href="#a84d8e3e2a4710d3e1143ca47020f1c4a">More...</a><br /></td></tr>
<tr class="separator:a84d8e3e2a4710d3e1143ca47020f1c4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad210b32f1218447fcff3dafafd0a9fb9"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_plain_text_engine.html#ad210b32f1218447fcff3dafafd0a9fb9">mightRender</a> (const QString &amp;) const</td></tr>
<tr class="separator:ad210b32f1218447fcff3dafafd0a9fb9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ed2a4aa7574f1badc88a3118a0de502"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_plain_text_engine.html#a4ed2a4aa7574f1badc88a3118a0de502">textMargins</a> (const QFont &amp;, const QString &amp;, double &amp;left, double &amp;right, double &amp;top, double &amp;bottom) const</td></tr>
<tr class="separator:a4ed2a4aa7574f1badc88a3118a0de502"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_qwt_text_engine"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_qwt_text_engine')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_qwt_text_engine.html">QwtTextEngine</a></td></tr>
<tr class="memitem:adda9e23494429c54b3cc3452940fb2bc inherit pub_methods_class_qwt_text_engine"><td class="memItemLeft" align="right" valign="top"><a id="adda9e23494429c54b3cc3452940fb2bc"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_text_engine.html#adda9e23494429c54b3cc3452940fb2bc">~QwtTextEngine</a> ()</td></tr>
<tr class="memdesc:adda9e23494429c54b3cc3452940fb2bc inherit pub_methods_class_qwt_text_engine"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:adda9e23494429c54b3cc3452940fb2bc inherit pub_methods_class_qwt_text_engine"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pro_methods_class_qwt_text_engine"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_class_qwt_text_engine')"><img src="closed.png" alt="-"/>&#160;Protected Member Functions inherited from <a class="el" href="class_qwt_text_engine.html">QwtTextEngine</a></td></tr>
<tr class="memitem:a97c5ef76ee920ab0f19e178e85017d9d inherit pro_methods_class_qwt_text_engine"><td class="memItemLeft" align="right" valign="top"><a id="a97c5ef76ee920ab0f19e178e85017d9d"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_qwt_text_engine.html#a97c5ef76ee920ab0f19e178e85017d9d">QwtTextEngine</a> ()</td></tr>
<tr class="memdesc:a97c5ef76ee920ab0f19e178e85017d9d inherit pro_methods_class_qwt_text_engine"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
<tr class="separator:a97c5ef76ee920ab0f19e178e85017d9d inherit pro_methods_class_qwt_text_engine"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A text engine for plain texts. </p>
<p><a class="el" href="class_qwt_plain_text_engine.html" title="A text engine for plain texts. ">QwtPlainTextEngine</a> renders texts using the basic Qt classes QPainter and QFontMetrics. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a84d8e3e2a4710d3e1143ca47020f1c4a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a84d8e3e2a4710d3e1143ca47020f1c4a">&#9670;&nbsp;</a></span>draw()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void QwtPlainTextEngine::draw </td>
          <td>(</td>
          <td class="paramtype">QPainter *&#160;</td>
          <td class="paramname"><em>painter</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QRectF &amp;&#160;</td>
          <td class="paramname"><em>rect</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>text</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Draw the text in a clipping rectangle. </p>
<p>A wrapper for QPainter::drawText.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">painter</td><td>Painter </td></tr>
    <tr><td class="paramname">rect</td><td>Clipping rectangle </td></tr>
    <tr><td class="paramname">flags</td><td>Bitwise OR of the flags used like in QPainter::drawText </td></tr>
    <tr><td class="paramname">text</td><td>Text to be rendered </td></tr>
  </table>
  </dd>
</dl>

<p>Implements <a class="el" href="class_qwt_text_engine.html#ad727f58f9eebfec86369e7f2e5bf6a59">QwtTextEngine</a>.</p>

</div>
</div>
<a id="ac5cedc0d644433b2ff14b3740996eb7d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac5cedc0d644433b2ff14b3740996eb7d">&#9670;&nbsp;</a></span>heightForWidth()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double QwtPlainTextEngine::heightForWidth </td>
          <td>(</td>
          <td class="paramtype">const QFont &amp;&#160;</td>
          <td class="paramname"><em>font</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>width</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Find the height for a given width</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">font</td><td>Font of the text </td></tr>
    <tr><td class="paramname">flags</td><td>Bitwise OR of the flags used like in QPainter::drawText </td></tr>
    <tr><td class="paramname">text</td><td>Text to be rendered </td></tr>
    <tr><td class="paramname">width</td><td>Width</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Calculated height </dd></dl>

<p>Implements <a class="el" href="class_qwt_text_engine.html#aee891b14d90c817b8c73d551f623cc17">QwtTextEngine</a>.</p>

</div>
</div>
<a id="ad210b32f1218447fcff3dafafd0a9fb9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad210b32f1218447fcff3dafafd0a9fb9">&#9670;&nbsp;</a></span>mightRender()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool QwtPlainTextEngine::mightRender </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Test if a string can be rendered by this text engine. </p><dl class="section return"><dt>Returns</dt><dd>Always true. All texts can be rendered by <a class="el" href="class_qwt_plain_text_engine.html" title="A text engine for plain texts. ">QwtPlainTextEngine</a> </dd></dl>

<p>Implements <a class="el" href="class_qwt_text_engine.html#a98316f2f6f4f50216ceffbe9babe2901">QwtTextEngine</a>.</p>

</div>
</div>
<a id="a4ed2a4aa7574f1badc88a3118a0de502"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4ed2a4aa7574f1badc88a3118a0de502">&#9670;&nbsp;</a></span>textMargins()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void QwtPlainTextEngine::textMargins </td>
          <td>(</td>
          <td class="paramtype">const QFont &amp;&#160;</td>
          <td class="paramname"><em>font</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"><em>left</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"><em>right</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"><em>top</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"><em>bottom</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Return margins around the texts</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">font</td><td>Font of the text </td></tr>
    <tr><td class="paramname">left</td><td>Return 0 </td></tr>
    <tr><td class="paramname">right</td><td>Return 0 </td></tr>
    <tr><td class="paramname">top</td><td>Return value for the top margin </td></tr>
    <tr><td class="paramname">bottom</td><td>Return value for the bottom margin </td></tr>
  </table>
  </dd>
</dl>

<p>Implements <a class="el" href="class_qwt_text_engine.html#a83c8d3dc590b9914e9216c01e78e0838">QwtTextEngine</a>.</p>

</div>
</div>
<a id="ab4937c7b9d44aa4d1cc5dcd1d7740b3b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab4937c7b9d44aa4d1cc5dcd1d7740b3b">&#9670;&nbsp;</a></span>textSize()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QSizeF QwtPlainTextEngine::textSize </td>
          <td>(</td>
          <td class="paramtype">const QFont &amp;&#160;</td>
          <td class="paramname"><em>font</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>text</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the size, that is needed to render text</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">font</td><td>Font of the text </td></tr>
    <tr><td class="paramname">flags</td><td>Bitwise OR of the flags used like in QPainter::drawText </td></tr>
    <tr><td class="paramname">text</td><td>Text to be rendered</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Calculated size </dd></dl>

<p>Implements <a class="el" href="class_qwt_text_engine.html#ad9382cc8ff22c6b3e448fce566a76178">QwtTextEngine</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_qwt_plain_text_engine.html">QwtPlainTextEngine</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
  </ul>
</div>
</body>
</html>
